home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / applications / 726 < prev    next >
Encoding:
Text File  |  1996-08-05  |  5.2 KB  |  105 lines

  1. Newsgroups: comp.sys.amiga.applications
  2. Path: fnnews.fnal.gov!unixhub!news
  3. From: wglp09@scsa1.slac.stanford.edu (W.G.J. Langeveld)
  4. Subject: Re: Executive Probs with Maple
  5. Content-Type: text/plain; charset=iso-8859-1
  6. Message-ID: <DLAvwq.FuI@unixhub.SLAC.Stanford.EDU>
  7. Sender: news@unixhub.SLAC.Stanford.EDU
  8. Content-Transfer-Encoding: 8bit
  9. Organization: Stanford Linear Accelerator Center
  10. X-Newsreader: Interworks_GRn 3.0b11 September 9, 1995
  11. References:  <4d8soj$a8i@walrus.megabaud.fi>
  12. Mime-Version: 1.0
  13. Date: Wed, 17 Jan 1996 00:55:38 GMT
  14.  
  15. In article <4d8soj$a8i@walrus.megabaud.fi> petrin@walrus.megabaud.fi (Petri Nordlund) writes:
  16. > W.G.J. Langeveld <wglp09@scsa1.slac.stanford.edu> writes:
  17. > >> >Having said that, if there's a way we can make Executive happy in an upcoming
  18. > >> >patch of (that is, if there will be one) Maple without compromising running
  19. > >> >without Executive, then we will likely do so.
  20. > >>
  21. > >>   Yes there is, the Maple<-->MaplePlot3D interface should be fixed so that
  22. > >>   it would work regardless of task priorities. I wonder why the MaplePlot3D
  23. > >>   task was given priority -24 in the first place?
  24. > >
  25. > >My guess is that Executive sets it that way. Here's why I think so.
  26. > >I call SystemTags() with just enough parameters to run the plotter. I do not
  27. > >specify a priority, because SystemTags is documented as setting the priority
  28. > >to the same value as the task calling it, which is precisely what I want: I
  29. > >want the main Maple program and the plotter to get equal CPU time. And that
  30. > >single call to SystemTags() is all that happens. There's no task priority
  31. > >setting anywhere else in Maple. If that's not "compatible with system legal
  32. > >software" then I don't know what is.
  33. >   I have tested Executive only with Maple 1.0, may something was
  34. >   changed in later versions?
  35.  
  36. You mean the original version of Maple for the Amiga, not Maple V release 3?
  37. You betcha it was changed. It was rewritten completely, not a line of code is
  38. the same.
  39.  
  40. > >Here's my guess at what happens: Assume Maple gets started at priority 0.
  41. > >Now, someone wants to plot something. Maple needs to do a bunch of calculations
  42. > >before it is ready to spawn the plotter. By that time, perhaps, Executive has
  43. > >set Maple's priority down to -24, to give other tasks (if any) a chance to
  44. > >work. And, perhaps, Maple executes the SystemTags call for some reason not
  45. > >at priority 0 as it otherwise would but still at priority -24. And so, the
  46. > >base priority of the plotter becomes -24, and assuming that Executive will
  47. > >never let any task get a priority higher than its base priority, the plotter
  48. > >will essentially never run. If my guess is correct, then it's clearly a bug
  49. > >in Executive: it should start tasks spawned by other tasks at the same *base*
  50. > >priority as the parent task, not at the *current* priority of the parent task.
  51. >   I know this problem and in AddTask() Executive checks if the parent
  52. >   task is scheduled, and if the new task has same priority, it will be
  53. >   given the parent task's real priority. The scheduler will adjust the
  54. >   priority later, but Executive remembers correct task priorities and
  55. >   can restore them when it quits.
  56.  
  57. Good, that's how it is supposed to work. So you are SetFunction()ing
  58. AddTask()?
  59.  
  60. >   If the MaplePlot3D task would get its priority (-24) from the
  61.  
  62. Now, let's be clear on this, are you testing this with the old version of
  63. Maple? What is the name of the plotter's executable? If it is MaplePlot3D
  64. or MaplePlot3D881, then you're talking about the old version, and I will
  65. have nothing to do with it. It could well start things at -24, who knows?
  66. I didn't write that version. If the name of the executable is mplotamiga.881
  67. (or mplotamiga.ieee) then we're talking about the new version. Let's only
  68. discuss the new version from now on.
  69.  
  70. >   parent task, then the parent task should also have priority -24,
  71. >   but it doesn't, it is 0.
  72. >   Anyway, the MaplePlot3D task gets priority -24 even without Executive.
  73. >   I tried booting without startup-sequence and then started Maple, and
  74. >   the priority was -24. The system was totally clean, no other programs,
  75. >   not even SetPatch was run.
  76. >   I did some testing, and when AddTask() is called, the priority in the
  77. >   task structure is already set to -24.
  78.  
  79. I have a feeling you're testing the old version.
  80.  
  81. > >By the way, if a user did not run Executive, and if the user just set the
  82. > >priority of Maple to something else, everything would continue to work:
  83. > >the plotter would still be started up at the same priority as Maple itself,
  84. > >if the plotter wasn't running yet. And if the plotter were already running
  85. > >and the user set Maple's priority higher then the plotter's, then the user
  86. > >would get the completely expected result that the plotter wouldn't run very
  87. > >well. My answer would simply be: don't do that.
  88. >   But if user lowers Maple's priority below the plotter's, the plotter
  89. >   will not work anymore.
  90.  
  91. Not true, actually. The plotter will run fine with Maple's priority set
  92. lower. That is, it can redraw stuff and rotate, etc. Again, I suspect
  93. you're looking at the old version.
  94.  
  95.     Willy.
  96.  
  97. -- 
  98. W.G.J. Langeveld - SLAC | e-mail: wglp09@scsa1.slac.stanford.edu
  99.                         |         langeveld@bix.com
  100.